package com.ctbu.tourism.service;

import com.ctbu.tourism.api.CommentAPI;
import com.ctbu.tourism.entity.Comment;
import com.ctbu.tourism.entity.Message;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CommentService {

    @Autowired
    CommentAPI commentAPI;

    public List<Comment> getCommentByPID(Integer pid){return commentAPI.getCommentByPID(pid);}

    public Integer addComment(Integer pid,String content,Integer commentator,Integer becommented,String type){return commentAPI.addComment(pid,content,commentator,becommented,type);}

    public   List<Message> getMessageByUID(Integer uid){return commentAPI.getMessageByUID(uid);}
    public   Integer updateCommentStatus(Integer uid){return commentAPI.updateCommentStatus(uid);}
}
